class_name RunState

extends IState


# 进入方法
func enter() -> void:
	super.enter()


#退出方法
func exit() -> void:
	pass
    

#逻辑更新
func logic_update(_delta: float) -> void:
	#如果角色不在地面上
	if not characterCtr.character_on_ground():
		#切换至下落的状态
		stateMachine.switch_character_state(StateMachine.CharacterStates.FALL)
	else:
		characterCtr.character_horizontal_move(_delta, 1)

    
#物理更新
func physics_update(_delta: float) -> void:
	pass


func get_type() -> StateMachine.CharacterStates:
	return StateMachine.CharacterStates.RUN


func get_anm_name() -> String:
	# print("获取跑步动画")
	return "Run"
